import time

from Base.base import Base
from Page.mis.page_element import PageElements


class MisHome(Base):

    def __init__(self):
        super().__init__("mis")

    def login_confirm(self):
        """登入确认-管理员"""
        return self.search_ele(PageElements.mis_login_confirm).text

    def information_manage(self):
        """信息管理按钮"""
        self.search_click(PageElements.mis_home_information_manage_xpath)

    def content_audit(self):
        """内容审核按钮"""
        # 点击信息管理
        self.information_manage()
        time.sleep(0.5)
        # 点击内容审核
        self.search_click(PageElements.mis_home_content_audit_xpath)
